﻿@model IEnumerable<kmaraszkiewicz.Models.Job>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create", "Job", new { id = 1 }, null)
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.AuthorDescription.AuthorDescriptionID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CompanyName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ComapnyLinkUrl)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.JobPosition)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateFrom)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateTo)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.AuthorDescription.AuthorDescriptionID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CompanyName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ComapnyLinkUrl)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.JobPosition)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateFrom)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateTo)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.JobId, parent = ViewBag.AuthorDescriptionId }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.JobId, parent = ViewBag.AuthorDescriptionId })
        </td>
    </tr>
}

</table>
